﻿<%@ Page Language="C#" MasterPageFile="~/Include/Admin.master" AutoEventWireup="true"
    CodeFile="ManagePro.aspx.cs" Inherits="Admin_City_ManagePro" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="/Style/DatePage.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <ajaxToolkit:ToolkitScriptManager runat="Server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true" ID="ScriptManager1" />
    <div>
        <table cellpadding="0" cellspacing="0" style="width: 100%" bgcolor="#CCCCFF">
            <tr>
                <td style="padding: 5px; padding-right: 5px;" colspan="3">
                    <table cellspacing="0" cellpadding="0" style="width: 100%; padding-bottom: 5px; border: 1px;
                        border-color: #66CCFF;">
                        <tr style="background-image: url('/images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
                            <td style="font-weight: bold; font-size: large; font-family: 仿宋; text-align: center">
                                <strong>省管理</strong>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" cellpadding="0" style="width: 100%; padding-bottom: 5px; border: 1px;
                        border-color: #66CCFF; background-color: #ffffff">
                        <tr>
                            <td align="center">
                                <asp:ListView ID="Lv_Sheng" runat="server" DataKeyNames="ID" OnItemCanceling="Lv_Sheng_ItemCanceling"
                                    OnItemDeleting="Lv_Sheng_ItemDeleting" OnItemEditing="Lv_Sheng_ItemEditing" OnItemUpdating="Lv_Sheng_ItemUpdating"
                                    OnPagePropertiesChanged="Lv_Sheng_PagePropertiesChanged">
                                    <LayoutTemplate>
                                        <table width="100%" class="editTable" cellspacing="1">
                                            <tr>
                                                <th>
                                                    省名称
                                                </th>
                                                <th>
                                                    操作
                                                </th>
                                            </tr>
                                            <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                                        </table>
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <a href="ManageCity.aspx?CID=<%#Eval("ID") %>">
                                                    <%#Eval("Name")%></a>
                                            </td>
                                            <td>
                                                <a href="ManageCity.aspx?CID=<%#Eval("ID") %>">添加市</a>&nbsp;
                                                <asp:LinkButton ID="lbtnEdit" runat="server" CommandName="Edit" Text="修改"></asp:LinkButton>&nbsp;
                                                <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('你确定要删除吗?');"
                                                    CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <tr>
                                            <td>
                                                <asp:TextBox ID="txtEditTitle" runat="server" Text='<%#Eval("Name")%>'></asp:TextBox>
                                            </td>
                                            <td style="width: 130px">
                                                <asp:LinkButton ID="lbtnCancel" runat="server" Text="取消" CommandName="Cancel"></asp:LinkButton>&nbsp;&nbsp;
                                                <asp:LinkButton ID="lbtnUpdate" runat="server" Text="更新" CommandName="Update"></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </EditItemTemplate>
                                </asp:ListView>
                                <div style="padding: 4px; text-align: center;">
                                    <asp:DataPager ID="Pager" runat="server" PagedControlID="Lv_Sheng" OnPreRender="Pager_PreRender"
                                        PageSize="20">
                                        <Fields>
                                            <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                                            <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                                                ShowFirstPageButton="true" />
                                            <asp:TemplatePagerField>
                                                <PagerTemplate>
                                                    共<%=Pager.TotalRowCount%>条
                                                </PagerTemplate>
                                            </asp:TemplatePagerField>
                                        </Fields>
                                    </asp:DataPager>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
        <br />
        <asp:HyperLink ID="hplAddType" runat="server" CssClass="linkbutton" Font-Underline="True">添加省</asp:HyperLink>
        <br />
        <asp:Panel ID="pnlAdd" runat="server" CssClass="addPnl" Width="373px">
            <p style="width: 170px; height: 22px;">
                请完成下面的内容:
            </p>
            <table cellspacing="1">
                <tr>
                    <th style="font-size: small" class="style3">
                        <span class="red">*</span>省名称
                    </th>
                    <td class="style1">
                        <asp:TextBox ID="txtSheng" runat="server" MaxLength="20"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style3">
                    </td>
                    <td class="style1">
                        <asp:Button ID="btnAdd" runat="server" Text="提交" ValidationGroup="ClientAddGroup"
                            UseSubmitBehavior="false" OnClick="btnAdd_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <ajaxToolkit:PopupControlExtender ID="pupAddType" runat="server" TargetControlID="hplAddType"
            PopupControlID="pnlAdd" Position="Bottom">
        </ajaxToolkit:PopupControlExtender>
    </div>
</asp:Content>
